#ifndef _CDFIZE_H_
#define _CDFIZE_H_

#include "dfize.h"
#include "CRegionSceneNode.h"

class CDFize : public IEventReceiver
{
public:
	CDFize();
	virtual ~CDFize();

	bool init();
	void run();

	bool OnEvent(const SEvent &event);

	void log(const char *a, const char *b = 0);

	void getFileList(const wchar_t *pattern, std::vector<std::wstring> &files);

	//SNode* getCreature(u32 index) const;
	//u32 getCreatureCount() const { return Creatures.size(); }

protected:
	bool createIrrlichtDevice();
	void createGui();

	bool initDfHack();

	IrrlichtDevice *Device;
	ITexture *HqTexture;
	IGUIImage *HqImage;
	IGUIListBox *CreatureList;
	IGUIStaticText *GuiTileType, *GuiVegType, *GuiMaterial;

	ICameraSceneNode *Camera;
	ISceneNodeAnimatorCameraFPS *CameraAnimator;
	ISceneNodeAnimatorCollisionResponse *CollisionAnimator;

	ISceneNode *CameraFollowNode;

	CRegionSceneNode *Region;

	DFHack::Context* DfHack;

	//std::vector<SNode*> Creatures;

	u32 CreatureUpdateInterval, MapX, MapY, MapZ;

	bool ShowCollisionData;
};

#endif